package com.vast.ui.itempanel.views;

import org.eclipse.jface.viewers.TableViewer;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Display;

import com.vast.ui.component.factory.ItemTableViewerFactory;
import com.vast.ui.component.models.ItemPanel;
import com.vast.ui.component.socketinterface.launchar.InterfaceLaunchar;
import com.vast.ui.component.toolbar.ToolBarAction;

public class ViewPart extends org.eclipse.ui.part.ViewPart {
	public Display     display;
	public Image       image;
	public TableViewer viewer;
	public ItemPanel   itemPanel;
	public ToolBarAction toolBarAction;
	public InterfaceLaunchar serverLaunchar;
	
	public ViewPart() {
		// TODO Auto-generated constructor stub
	}

	@Override
	public void createPartControl(Composite parent) {
		// TODO Auto-generated method stub
		display = parent.getDisplay();
		serverLaunchar = new InterfaceLaunchar(30000);
		toolBarAction = new ToolBarAction(this, serverLaunchar);
		
		itemPanel = new ItemPanel();
		serverLaunchar.addListener(itemPanel);
		viewer =  ItemTableViewerFactory.createTableViewer(parent, itemPanel, 8, 1, 0xFF00FF);

	}

	@Override
	public void setFocus() {
		// TODO Auto-generated method stub

	}

}
